package com.itheima.arrays;

import java.util.Arrays;

public class Demo {
    public static void main(String[] args) {
        int[] arr = {9,12,7,66,-1,3};
        int[] arr2 = new int[10];
        System.out.println(Arrays.toString(arr));

        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));

        int index = Arrays.binarySearch(arr,66);
        System.out.println("index = " + index);

        System.arraycopy(arr,0,arr2,0,arr.length);
        System.out.println(Arrays.toString(arr2));

        int[] newArr = Arrays.copyOf(arr, 10);
        System.out.println(Arrays.toString(newArr));
    }
}
